package data_flow;

import java.io.*;

public class PrintWritertest {
    public static void main(String[] args) throws Exception {
        try(OutputStream os=new FileOutputStream("D:\\桌面文件\\java课程\\课程资料\\javaweb\\a.txt")){
            try(Writer writer=new OutputStreamWriter(os,"UTF-8")){
                try(PrintWriter p1=new PrintWriter(writer)){
                    p1.println(1+1);
                    p1.print(3);
                    p1.printf("%s"+"%d","我",3);

                    p1.flush();
                }
            }
        }
    }
}
